import { createRouter, createWebHistory } from 'vue-router';
import TodayPage from '@/views/Today.vue';
import NotFoundPage from '@/views/404.vue';

const routes = [
    {
        path: '/',
        name: 'today',
        component: TodayPage
    },
    {
        path: '/tomorrow',
        name: 'tomorrow',
        component: () => import('@/views/Tomorrow.vue')
    },
    {
        path: '/week',
        name: 'week',
        component: () => import('@/views/Week.vue')
    },
    {
        path: '/month',
        name: 'month',
        component: () => import('@/views/Month.vue')
    },
    {
        path: '/year',
        name: 'year',
        component: () => import('@/views/Year.vue')
    },
    {
        path: '/error',
        name: 'error',
        component: () => import('@/views/Error.vue')
    },
    {
        path: '/:pathMatch(.*)*',
        name: 'NotFound',
        component: NotFoundPage
    }
]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router
